home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC_Samples / npp / mainfrm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  1.7 KB  |  68 lines

  1. // mainfrm.h : interface of the CMainFrame class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #include "npview.h"
  5.  
  6. // Array for the toolbar buttons
  7.  
  8. #if (_WIN32_WCE < 201)
  9. static TBBUTTON g_arCBButtons[] = {
  10.     { 0,    ID_FILE_NEW,    TBSTATE_ENABLED, TBSTYLE_BUTTON,    0, 0, 0,  0},
  11.     { 1,    ID_FILE_OPEN,    TBSTATE_ENABLED, TBSTYLE_BUTTON,    0, 0, 0,  1},
  12.     { 2,    ID_FILE_SAVE,    TBSTATE_ENABLED, TBSTYLE_BUTTON,    0, 0, 0,  2},
  13.     { 0,    0,                TBSTATE_ENABLED, TBSTYLE_SEP,        0, 0, 0, -1},
  14.     { 3,    ID_EDIT_CUT,    TBSTATE_ENABLED, TBSTYLE_BUTTON,    0, 0, 0,  3},
  15.     { 4,    ID_EDIT_COPY,    TBSTATE_ENABLED, TBSTYLE_BUTTON,    0, 0, 0,  4},
  16.     { 5,    ID_EDIT_PASTE,    TBSTATE_ENABLED, TBSTYLE_BUTTON,    0, 0, 0,  5}
  17. };
  18. #endif
  19.  
  20. class CMainFrame : public CFrameWnd
  21. {
  22. protected: // create from serialization only
  23.     CMainFrame();
  24.     DECLARE_DYNCREATE(CMainFrame)
  25.  
  26. // Attributes
  27. public:
  28. #if (_WIN32_WCE >= 201)
  29.     CCeCommandBar m_wndCommandBar;
  30. #endif
  31.  
  32. // Operations
  33. public:
  34.  
  35. // Overrides
  36.     // ClassWizard generated virtual function overrides
  37.     //{{AFX_VIRTUAL(CMainFrame)
  38.     //}}AFX_VIRTUAL
  39.  
  40. // Implementation
  41. public:
  42.     virtual ~CMainFrame();
  43. #ifdef _DEBUG
  44.     virtual void AssertValid() const;
  45.     virtual void Dump(CDumpContext& dc) const;
  46. #endif
  47.  
  48. protected:  // control bar embedded members
  49.  
  50. // Generated message map functions
  51. protected:
  52.     //{{AFX_MSG(CMainFrame)
  53.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  54.     //}}AFX_MSG
  55.     
  56.     DECLARE_MESSAGE_MAP()
  57. };
  58.  
  59. inline CNotepadView* GetApplicationView()
  60. {
  61.     CFrameWnd* pFrame = (CFrameWnd*)AfxGetMainWnd();
  62.     ASSERT(pFrame);
  63.     return (CNotepadView*)(pFrame)->GetActiveView();
  64. }
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67.  
  68.